package com.example.designpattern.behavioral.command.command;

import com.example.designpattern.behavioral.command.component.Music;
import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
@Data
public class MusicPlayCommand implements ICommand {

    private Music music;

    @Override
    public void execute() {
        music.play();
    }

    @Override
    public void undo() {
        music.stop();
    }
}
